Previous Book Contents Book Index Next

Inside Macintosh: Programming With JManager /
Chapter 2 - JManager Reference / JManager Functions
Abstract Window Toolkit Control Functions /


JMExecJNIStaticMethodInContext

Executes a static Java method in a given AWT context thread using the Java Native Interface (JNI).

OSStatus JMExecJNIStaticMethodInContext (
                     JMAWTContextRef context, 
                     JNIEnv* env, 
                     jclass classID, 
                     jmethodID methodID, 
                     UInt32 argCount, 
                     jvalue args[]);
context
The AWT context in whose thread you want the method to execute.
env
A pointer to the current JNIEnv data structure.
classID
The class ID of the class that contains the method.
methodID
The ID of the method.
argCount
The number of arguments in the method
args[]
The argument list.
function result
A result code; see "JManager Result Codes".
DISCUSSION
Before calling this function, you must call the JMGetCurrentEnv function to get the JNIEnv pointer.

For information about using this function to launch a Java application, see "Executing Java Applications".

If you want to execute a nonstatic Java method, you should call the JMExecJNIMethodInContext function instead.

You can find documentation on the Java Native Interface (JNI) at the Web page

http://java.sun.com/


Previous Book Contents Book Index Next

© Apple Computer, Inc.
10 DEC 1997